﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ecpWfAlertaParametroAcoesJudiciais.aspx.cs" Inherits="Protegidos_Empresas_Cadastros__popup_ecpWfAlertaParametroAcoesJudiciais" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register TagPrefix="uc1" TagName="HeadTag"  Src="~/_includes/HeadTag.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!-- Includes -->
    <uc1:HeadTag ID="HeadTag1" runat="server" />    
</head>
<body>
    <form id="form1" runat="server">
        <script type="text/javascript">
            function CloseAndRebind(args)
            {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.refreshGrid(args);
            }
    		
            function GetRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
    				
                return oWindow;
            }

            function CancelEdit()
            {
                GetRadWindow().Close();		
            }
        </script>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <table width="99%" align="right">
            <tr>
                <td>
                    <div class="SuTituloVR">Adicionar Alerta</div>
                </td>
            </tr>
            <tr>
                <td>
                
                    <table width="100%" align="right" class="textoCZ_12" > 
                        <tr>
                            <td style="width: 70px" class="textoCZ_12B">Alerta:</td>
                            <td>
                                Falta(m) <asp:TextBox ID="txtDias" runat="server" Width="25px"></asp:TextBox> dia(s) para a carga de <asp:Label ID="lblDocumento" runat="server" Text=""></asp:Label> <asp:Label ID="lblTipoPagamento" runat="server" Text=""></asp:Label>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="txtDias"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td class="textoCZ_12B">Nível:</td>
                            <td>
                                <telerik:RadComboBox ID="rcbNivel" runat="server" Skin="Telerik" Width="150px" EmptyMessage="Selecione" AllowCustomText="true">
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="rcbNivel"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                    </table>
                    
                </td>
            </tr>
            <tr>
                <td>
                    <div class="SuTituloVR">Destinatários - Patrocinador</div>
                </td>
            </tr>
            <tr>
                <td>
                    <telerik:RadGrid ID="GridGrupoPatrocinador" Width="100%" Skin="Telerik" 
                        runat="server" AllowPaging="false" AllowSorting="true"
                        GridLines="None" AutoGenerateColumns="false"
                        OnNeedDataSource="GridGrupoPatrocinador_NeedDataSource">
                        <MasterTableView GridLines="None" DataKeyNames="IdGrupoEmail">
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="Descricao" HeaderText="Grupo" DataField="Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Organizacao.NomeFantasia" HeaderText="Patrocinador" DataField="Organizacao.NomeFantasia" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Status.Descricao" HeaderText="Status" DataField="Status.Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" DataType="System.Boolean" DataField="ControlaGente" HeaderStyle-Width="130px">
				                    <HeaderTemplate>
				                       <asp:CheckBox id="chkHeaderGente" OnCheckedChanged="ChkSelectedPat" AutoPostBack="True" runat="server"></asp:CheckBox> Selecione
				                    </HeaderTemplate>
				                    <ItemTemplate>
					                    <asp:CheckBox id="chkGente" runat="server" Checked='<%# (DataBinder.Eval(Container.DataItem, "Selecionado")) %>'></asp:CheckBox>
				                    </ItemTemplate>
			                    </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="SuTituloVR">Destinatários - Prestadores</div>
                </td>
            </tr>
            <tr>
                <td>
                    <telerik:RadGrid ID="GridGrupoPrestador" Width="100%" Skin="Telerik" 
                        runat="server" AllowPaging="false" AllowSorting="true"
                        GridLines="None" AutoGenerateColumns="false"
                        OnNeedDataSource="GridGrupoPrestador_NeedDataSource">
                        <MasterTableView GridLines="None" DataKeyNames="IdGrupoEmail">
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="Descricao" HeaderText="Grupo" DataField="Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Organizacao.NomeFantasia" HeaderText="Patrocinador" DataField="Organizacao.NomeFantasia" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Status.Descricao" HeaderText="Status" DataField="Status.Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" DataType="System.Boolean" DataField="ControlaGente" HeaderStyle-Width="130px">
				                    <HeaderTemplate>
				                       <asp:CheckBox id="chkHeaderGente" OnCheckedChanged="ChkSelectedPrest" AutoPostBack="True" runat="server"></asp:CheckBox> Selecione
				                    </HeaderTemplate>
				                    <ItemTemplate>
					                    <asp:CheckBox id="chkGente" runat="server" Checked='<%# (DataBinder.Eval(Container.DataItem, "Selecionado")) %>'></asp:CheckBox>
				                    </ItemTemplate>
			                    </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <br />
                    <asp:Label ID="lblResultado" runat="server" Text=""></asp:Label>&nbsp;&nbsp;
                    <asp:Button ID="btnGravar" runat="server" Text="Gravar" Width="110px" ValidationGroup="1" onclick="btnGravar_Click" />&nbsp;&nbsp;
                    <asp:Button ID="btnFechar" runat="server" Text="Fechar" Width="110px" onclick="btnFechar_Click"/>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
